def echo():
    print('第一次运行next()')
    yield 1
    print('第二次运行next()')
    yield 2


g = echo()
print(next(g))
g.close()
print(next(g))

